package easy;

public class Solution_598 {

    public int maxCount(int m, int n, int[][] ops) {
        int colMin = n, rowMin = m;
        for (int[] op : ops) {
            rowMin = Math.min(op[0], rowMin);
            colMin = Math.min(op[1], colMin);
        }
        return rowMin * colMin;
    }

    public static void main(String[] args) {
        Solution_598 model = new Solution_598();
        System.out.println(model.maxCount(3, 3, new int[][]{{2, 2}, {3, 3}}));
        System.out.println(model.maxCount(3, 3, new int[][]{{2, 2}, {3, 3}, {2, 1}}));
    }
}
